<template>
  <div class="box">
    <div class="head-fixed">
      <div class="head">
        <img src="../../assets/zjt2.png" alt="" class="back" @click="back()" />
        <div class="head-search" >已投简历</div>

      </div>
    </div>
    <div v-if="status==0" class="content">
      <div v-for="item in lists" class="block" >
          <div class="block-top">
              <div>{{item.title}}</div>
              <span>{{item.addtime}}</span>
          </div>
          <div class="block-btm">
              <div>{{item.companyName}}</div>
              <span v-if="item.postStatus==0">未查看</span>
              <span v-if="item.postStatus==1" class="bbb">已查看</span>
          </div>
      </div>
    </div>
<!--    <div v-if="status==1" class="content">
      <div v-for="item in lists" class="block" @click="go(item.userId)">
          <div class="block-top">
              <div>{{item.userName}}</div>
              <span>{{item.addtime}}</span>
          </div>
          <div class="block-btm">
              <div>{{item.position}}</div>
              <span v-if="item.postStatus==0">未查看</span>
              <span v-if="item.postStatus==1" class="bbb">已查看</span>
          </div>
      </div>
    </div> -->
  </div>
</template>

<script>
export default {
  inject: ["reload"],
  name: "deliver",
  components: {},
  created() {
    // created 在模板渲染成html前调用，即通常初始化某些属性值，然后再渲染成视图
	this.init()
  },
  mounted() {
    // mounted在模板渲染成html后调用，通常是初始化页面完成后，再对html的dom节点进行一些需要的操作
  },
  // data() 为变量赋值等
  data() {
    return {
      // status为用户身份，0是求职者，1是招聘者
      status:localStorage.status,
      list: [
        {
          name: "Java开发",
          time: "2021-12-01",
          to: "大连xxxxx公司",
          look: 0,
        },
      ],
      // lists:[
      //   // {
      //   //   name: "张三",
      //   //   time: "2021-12-04",
      //   //   to: "网页设计师",
      //   //   look: 1,
      //   // }
      // ],
	  // lists:[
	  //   {
	  //     name: "张三",
	  //     time: "2021-12-04",
	  //     to: "网页设计师",
	  //     look: 1,
	  //   }
	  // ]
    };
  },
  // methods 编写js函数
  methods: {
	init() {

	},
    go(id) {
      if(this.status==0){
        this.$router.push("/post");
      }
    },
    back(){
      this.$router.go(-1);//返回上一层
    },
  },
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
html,
body,
.tac,
.box,
.tab-left,
.tab-left .el-menu {
  height: 100%;
}

.box {
  width: 100%;
  background: rgb(248, 248, 248);
}
.head-fixed {
  width: 100%;
  height: 84px;
  position: fixed;
  z-index: 999;
}
.head {
  background: #3e63a8;
  color: #fff;
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.back {
  width: 14px;
  height: 14px;
}
.head div img {
  width: 20px;
  height: 20px;
}
.head-search {
  box-sizing: border-box;
  width: 100%;
  text-align: center;
  font-size: 14px;
}
.content {
  position: relative;
  top: 40px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
}
.block{
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 2px 2px 5px #c7c7c7;
    margin-bottom: 10px;
}
.block-top,.block-btm{
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.block-top{
    margin-bottom: 10px;
}
.block-top div{
    font-size: 16px;
}
.block-top span{
    font-size: 12px;
    color: #bbb;
}
.block-btm div{
    color: #bbb;
    font-size: 14px;
}
.block-btm span{
    font-size: 14px;
    color: #3e63a8;
}
.bbb{
  color: #bbb !important;
}
</style>
